#ifndef _INDEX_RAW_MMAP_H
#define _INDEX_RAW_MMAP_H

#include "stdlib.h"
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include "logger.h"

typedef struct index_file_mmap_t
{
	int fsize ;
	int fd ;
	void* pmmap ;
}index_file_mmap ;

int open_file_mmap (const char *filename, index_file_mmap *file_mmap) ;
int free_file_mmap (index_file_mmap *file_mmap) ;
void* raw_read_mmap (index_file_mmap *file_mmap, unsigned int offset, unsigned int size, const char *where) ;

#endif 
